#requsts doc http://docs.python-requests.org/zh_CN/latest/
#print('hello world')
import requests

list=[]
url='https://api.bilibili.com/x/relation/stat?vmid={}'
def getfollow(mid):
	try:
		 follower_dic={}
		r=requests.get(url.format(mid)).json()
		data=r['data']
		follower_dict['mid']=data['mid']
		follower_dict['follower']=data['follower']
		follower_dict['following']=data['following']
		list.append(follower_dict)
		print(follower_dict)
	except:
		print(mid+'error')

for i in range(1,10):
	getfollow(i)
